<% cache(post, expires_in: 1.week) do %>
  <%= content_tag :article, id: dom_id(post), class: 'thredded--post' do %>
    <%= render 'thredded/posts_common/header', post: post %>
    <%= render 'thredded/posts_common/content', post: post %>
    <%= render 'thredded/posts_common/actions', post: post %>
    <% if post.pending_moderation? && !Thredded.content_visible_while_pending_moderation %>
      <p class="thredded--alert thredded--alert-warning"><%= t 'thredded.posts.pending_moderation_notice' %></p>
    <% elsif post.blocked? && post.can_moderate? %>
      <p class="thredded--alert thredded--alert-danger">
        <%= render 'thredded/shared/content_moderation_blocked_state', moderation_record: post.last_moderation_record %>
      </p>
    <% end %>
  <% end %>
<% end %>
